﻿<%@ page language="C#" autoeventwireup="true" inherits="zc, App_Web_2j4u444m" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" name="viewport" /> 
<meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta content="yes" name="apple-mobile-web-app-capable" /> 
<meta content="black" name="apple-mobile-web-app-status-bar-style" /> 
<meta content="telephone=no" name="format-detection" />
<link type="text/css" href="css/index.css" rel="stylesheet" />
<title>会员注册</title>
</head>
<body>
    <form id="form1" runat="server">
    <div class="navmenu">
    <span class="hovbtn"><a href="zc.aspx">老会员绑定</a></span>
    <span class="norbtn"><a href="index2.aspx">新会员注册</a></span>
</div>

<div class="regcon regcon2">
   
    <div class="regconli"><input name="" type="text" placeholder="请输入手机号码" runat="server" id="txtPhone" value="" class="txt"/> </div>
   <div>
   <span  class="regconli"><input name="" type="text" placeholder="短信验证码" value="" runat="server" id="txtNum" class="txt" style="width:98%"/></span> 
  <span class="yanzheng" onclick="check2()"  runat="server" id="divT">获取短信验证码</span>
   <asp:Button ID="Button2" style="display:none;" runat="server" Text="获取短信验证码" class="yanzheng" 
           onclick="Button2_Click"/>
   </div>
  
   <div class="btn"  onclick="check()">绑定会员卡
    </div>
    <asp:Button ID="Button1" class="btn" Width="100%" style="display:none;"  runat="server" Text="绑定会员卡"  OnClick="Button1_Click" />
</div>
<div style="text-align:center;"><asp:Label ID="Label1" runat="server" ForeColor="Red"></asp:Label></div>
 <input type="hidden" runat="server" id="numT"  value="0"/>
    </form>
</body>
</html>
<script type="text/javascript">
    setInterval("SetDX()", 1000);
    function check() {
        document.getElementById("Label1").innerHTML = "";
        document.getElementById("Button1").click();

    }
    function check2() {
        document.getElementById("Label1").innerHTML = "";
        var num = document.getElementById("numT").value;
        if (num == 0)
        document.getElementById("Button2").click();

    }

    function SetDX() {
        var num = document.getElementById("numT").value;
        if (num > 0 && num <= 60) {
            // document.getElementById("Button3").click();
            num--;
            document.getElementById("numT").value = num;
            document.getElementById("divT").innerHTML = "(" + num + "秒后重新获取)";
            if (num == 0) {
                document.getElementById("divT").innerHTML = "获取短信验证码";
            }
            //setTimeout("SetDX()", 1000);
        }
    }
</script>
